<template>
  <div>
    <el-radio-group v-model="selectRadio">
      <el-radio-button label="0">资源</el-radio-button>
      <el-radio-button label="1">项目</el-radio-button>
    </el-radio-group>
    <el-form
      ref="resourceForm"
      :model="resourceForm"
      label-width="120px"
      v-if="selectRadio == 0"
      style="margin-top: 30px"
    >
      <el-form-item label="经销商电话">
        <el-select
          v-model="resourceForm.region"
          placeholder="请选择活动区域"
          style="width: 100%"
        >
          <el-option label="区域一" value="shanghai"></el-option>
          <el-option label="区域二" value="beijing"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="经销商姓名">
        <el-input v-model="resourceForm.name"></el-input>
      </el-form-item>
      <el-form-item label="跟进形式">
        <el-input v-model="resourceForm.name"></el-input>
      </el-form-item>
      <el-form-item label="跟进日期">
        <el-date-picker
          v-model="resourceForm.date"
          type="date"
          placeholder="选择日期"
          style="width: 100%"
        >
        </el-date-picker>
      </el-form-item>
      <el-form-item label="跟进内容">
        <el-input type="textarea" v-model="resourceForm.desc"></el-input>
      </el-form-item>
      <el-form-item label="附件">
        <file-upload
          :isShowTip="true"
          :fileSize="20"
          :limit="1"
          :fileType="['xls', 'xlsx']"
        ></file-upload>
      </el-form-item>
      <el-form-item label="跟进人">
        <el-input v-model="resourceForm.name" disabled></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">确定</el-button>
        <el-button>取消</el-button>
      </el-form-item>
    </el-form>
    <el-form
      ref="clueForm"
      :model="projectForm"
      label-width="120px"
      v-else
      style="margin-top: 30px"
    >
      <el-form-item label="经销商电话">
        <el-select
          v-model="projectForm.region"
          placeholder="请选择活动区域"
          style="width: 100%"
        >
          <el-option label="区域一" value="shanghai"></el-option>
          <el-option label="区域二" value="beijing"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="经销商姓名">
        <el-input v-model="projectForm.name"></el-input>
      </el-form-item>
      <el-form-item label="跟进项目">
        <el-select
          v-model="projectForm.region"
          placeholder="请选择活动区域"
          style="width: 100%"
        >
          <el-option label="区域一" value="shanghai"></el-option>
          <el-option label="区域二" value="beijing"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="项目阶段">
        <el-select
          v-model="projectForm.region"
          placeholder="请选择活动区域"
          style="width: 100%"
        >
          <el-option label="区域一" value="shanghai"></el-option>
          <el-option label="区域二" value="beijing"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="跟进形式">
        <el-select
          v-model="projectForm.region"
          placeholder="请选择活动区域"
          style="width: 100%"
        >
          <el-option label="区域一" value="shanghai"></el-option>
          <el-option label="区域二" value="beijing"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="跟进日期">
        <el-date-picker
          v-model="projectForm.date"
          type="date"
          placeholder="选择日期"
          style="width: 100%"
        >
        </el-date-picker>
      </el-form-item>
      <el-form-item label="跟进内容">
        <el-input type="textarea" v-model="projectForm.desc"></el-input>
      </el-form-item>
      <el-form-item label="附件">
        <file-upload
          :isShowTip="true"
          :fileSize="20"
          :limit="1"
          :fileType="['xls', 'xlsx']"
        ></file-upload>
      </el-form-item>
      <el-form-item label="跟进人">
        <el-input v-model="projectForm.name"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">确定</el-button>
        <el-button>取消</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
export default {
  data() {
    return {
      selectRadio: "0",
      resourceForm: {},
      projectForm: {},
    };
  },
  methods: {
    onSubmit() {
      console.log("submit!");
    },
  },
};
</script>
<style lang="scss" scoped></style>
